package com.ruoyi.common.core.domain.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * 资产类型信息对象 ams_asset_type
 * 
 * @author yfkj
 * @date 2021-10-15
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AmsAssetType extends com.ruoyi.common.core.web.domain.BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** 资产类型信息主键 */
    @TableField(exist = true)
    @ApiModelProperty(value =  "${comment}")
    @TableId(type = IdType.AUTO)
    private Long assetTypeId;
    /** 父id */
    @Excel(name = "父id")
    @TableField(exist = true)
    @ApiModelProperty(value =  "父id")
    private Long parentId;
    /** 祖级列表 */
    @Excel(name = "祖级列表")
    @TableField(exist = true)
    @ApiModelProperty(value =  "祖级列表")
    private String ancestors;
    /** 类型名称 */
    @Excel(name = "类型名称")
    @TableField(exist = true)
    @ApiModelProperty(value =  "类型名称")
    private String assetTypeName;
    /** 类型编码 */
    @Excel(name = "类型编码")
    @TableField(exist = true)
    @ApiModelProperty(value =  "类型编码")
    private String assetTypeCode;

    @TableField(exist = false)
    @ApiModelProperty(value =  "资产数量")
    private Integer assetNum;

    @TableField(exist = false)
    @ApiModelProperty(value =  "资产金额")
    private Long assetAmount;

    @TableField(exist = false)
    @ApiModelProperty(value =  "子列表")
    private List<AmsAssetType> children;

    public static final String ASSET_TYPE_ID="asset_type_id";
    public static final String PARENT_ID="parent_id";
    public static final String ANCESTORS="ancestors";
    public static final String ASSET_TYPE_NAME="asset_type_name";
    public static final String ASSET_TYPE_CODE="asset_type_code";
    public static final String CREATE_BY="create_by";
    public static final String CREATE_TIME="create_time";
    public static final String UPDATE_BY="update_by";
    public static final String UPDATE_TIME="update_time";
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("assetTypeId", getAssetTypeId())
            .append("parentId", getParentId())
            .append("ancestors", getAncestors())
            .append("assetTypeName", getAssetTypeName())
            .append("assetTypeCode", getAssetTypeCode())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
